<?php
    DEFINE('HOST', '127.0.0.1');
    DEFINE('USER','root');
    DEFINE('PASSWORD', '970518');
    DEFINE('DBNAME', 'stuinfo');
// 加入编码
    //mysql_set_charset("utf8"); 
// 创建连接
    $conn = @mysqli_connect(HOST, USER, PASSWORD,DBNAME)
OR die('Could not connect to Mysql' .
            mysqli_connect_error());
    ?>